//
//  YBConfigSettingVC.swift
//  Moonlight
//
//  Created by 清风徐来 on 2023/11/1.
//  Copyright © 2023 Moonlight Game Streaming Project. All rights reserved.
//

import UIKit
import EachNavigationBar

class YBConfigSettingVC: BaseVC {
    
    lazy var configVC : UIViewController = {
        let storyboard = UIStoryboard(name: "Setting", bundle: nil)
        let viewController = storyboard.instantiateViewController(withIdentifier: "SettingsViewController")
        return viewController
    }()
    
    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        if let configVC = configVC as? SettingsViewController {
            configVC.saveSettings()
        }
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        navigation.item.title = "设置"
        func_addsubViewController()
    }
    
    private func func_addsubViewController() {
        addChild(configVC)
        view.addSubview(configVC.view)
        configVC.didMove(toParent: self)
    }
    
}
